package copyengine.log
{
    import com.junkbyte.console.Cc;

    import flash.display.Stage;

    public final class CcLogImpl implements IDebugLog
    {
        public function CcLogImpl()
        {
        }

        public function initialize(_stage:Stage):void
        {
            Cc.config.tracing = true;
            Cc.startOnStage(_stage, "~");
        }

        public function err(...args):void
        {
            Cc.error(args);
        }

        public function logCh(_ch:String, ...args):void
        {
            if (_ch != null || _ch != "") {
                Cc.infoch(_ch, args);
            } else {
                Cc.log(args);
            }
        }

        public function warn(...args):void
        {
            Cc.warn(args);
        }
    }
}
